﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using WalkingTec.Mvvm.Core;

namespace SelfService.Model.Models
{
    public class SysOperator : BasePoco
    {
        [Display(Name = "名称")]
        [StringLength(64)]
        [Required]
        public string Name { get; set; }

        [Display(Name = "编码")]
        [Required]
        [StringLength(64)]
        public string Code { get; set; }

        [Display(Name = "描述")]
        [StringLength(256)]
        public string Description { get; set; }

        [Display(Name = "操作员分类")]
        public SysOperatorGroup Group { get; set; }

        [Display(Name = "操作员分类")]
        [Required]
        public Guid GroupId { get; set; }

        [Display(Name = "客户端")]
        [JsonIgnore]
        public SysClient Client { get; set; }

        [Display(Name = "客户端ID")]
        [Required]
        public Guid ClientId { get; set; }

        [Display(Name = "密码")]
        [StringLength(64)]
        public string Password { get; set; }

        [Display(Name = "Token")]
        [StringLength(64)]
        public string Token { get; set; }

        [Display(Name = "是否启用")]
        public CommonYesOrNo IsEnable { get; set; }
    }
}
